#define _CRT_SECURE_NO_WARNINGS 1

#include<stdio.h>
int main() {
	int a, b, c, d, n, i;
	b = c = d = i = 0;

	scanf_s("%d", &n);
	while (i < n) {
		a = 0;
		scanf("%d", &a);
		if ((a >= 85) && (a <= 100))
			b += 1;
		if ((a >= 60) && (a <= 85))
			c += 1;
		if ((a >= 0) && (a <= 60))
			d += 1;
		i++;
	}

	printf("%d %d %d", b, c, d);
	return 0;
}